package com.ufenlei.LTS {
	import com.ufenlei.LTS.Input;

	import flash.events.Event;
	/**
	 * @author bbn
	 */
	public class Button extends Input {
		public function Button(defaultValue : Boolean = false, locked : Boolean = false) {
			super(defaultValue, locked);
			this.addEventListener(Input.MOUSE_DOWN, onMouseDown,true);
			this.addEventListener(Input.MOUSE_UP, onMouseUp,true);
			this.addEventListener(Input.MOUSE_OUT, onMouseOut,true);
		}
		private function onMouseDown(evt:Event):void{
			this.select();
		}
		private function onMouseUp(evt:Event):void{
			this.unselect();
		}
		private function onMouseOut(evt:Event):void{
			this.unselect();
		}
	}
}